package com.flowersworld;class Flower {

    private String name;
    private int age;


    String getName()
    {
        return name;
    }
    public void setName(String name){
        this.name=name;
    }

    public int getAge(){
        return age;
    }
    public void setAge(int age){
        this.age=age;
    }

}
class Deer extends Flower{
    private String color;
    private String favoritefood;
    public String getColor(){
        return color;
    }
    public void setColor(String color){
        this.color=color;
    }

    public String getFavoritefood(){
        return favoritefood;
    }
    public void setFavoritefood(String favoritefood){
        this.favoritefood=favoritefood;
    }
}


public class Flowerworld.java{
    public static void main(String[] args) {
        Deer deer= new Deer();
        deer.setName("向日葵");
        deer.setAge(15);
        deer.setColor("黄色");
        deer.setFavoritefood("阳光");
        System.out.println("名称："+deer.getName()+",年龄："+deer.getAge()+",颜色: "+deer.getColor()+",喜欢的食物："+deer.getFavoritefood());
    }
}

public class test {
}
